home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / mslang / zstud1 / zdemovw.cp_ / ZDEMOVW.CPP
Encoding:
C/C++ Source or Header  |  1994-04-09  |  2.2 KB  |  80 lines

  1. // zdemovw.cpp : implementation of the CZdemoView class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "zdemo.h"
  6.  
  7. #include "zdemodoc.h"
  8. #include "zdemovw.h"
  9.  
  10. #ifdef _DEBUG
  11. #undef THIS_FILE
  12. static char BASED_CODE THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15.             //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  16.             // CZdemoView
  17.             
  18.             IMPLEMENT_DYNCREATE(CZdemoView, CFormView)
  19.             
  20.             BEGIN_MESSAGE_MAP(CZdemoView, CFormView)
  21.                 //{{AFX_MSG_MAP(CZdemoView)
  22.                     // NOTE - the ClassWizard will add and remove mapping macros here.
  23.                 ON_WM_CTLCOLOR()
  24.                     //    DO NOT EDIT what you see in these blocks of generated code!
  25.                 //}}AFX_MSG_MAP
  26.             END_MESSAGE_MAP()
  27.             
  28.             /////////////////////////////////////////////////////////////////////////////
  29.             // CZdemoView construction/destruction
  30.             
  31.             CZdemoView::CZdemoView()   :CFormView(IDD_MAIN )
  32.             {
  33.                 // TODO: add construction code here
  34.             }
  35.             
  36.             CZdemoView::~CZdemoView()
  37.             {
  38.             }
  39.             
  40.             /////////////////////////////////////////////////////////////////////////////
  41.             // CZdemoView drawing
  42.             
  43.             void CZdemoView::OnDraw(CDC* pDC)
  44.             {
  45.                 CZdemoDoc* pDoc = GetDocument();
  46.                 ASSERT_VALID(pDoc);
  47.             
  48.                 SetDlgItemText( IDC_FILE, CurrentZipFile );        // write the value of the current zip file
  49.             }
  50.             
  51.             /////////////////////////////////////////////////////////////////////////////
  52.             // CZdemoView diagnostics
  53.             
  54.             #ifdef _DEBUG
  55.             void CZdemoView::AssertValid() const
  56.             {
  57.                 CView::AssertValid();
  58.             }
  59.             
  60.             void CZdemoView::Dump(CDumpContext& dc) const
  61.             {
  62.                 CView::Dump(dc);
  63.             }
  64.             
  65.             CZdemoDoc* CZdemoView::GetDocument() // non-debug version is inline
  66.             {
  67.                 ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CZdemoDoc)));
  68.                 return (CZdemoDoc*)m_pDocument;
  69.             }
  70.             #endif //_DEBUG
  71.             
  72.             /////////////////////////////////////////////////////////////////////////////
  73.             // CZdemoView message handlers
  74.             
  75.             HBRUSH CZdemoView::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
  76.             {
  77.                 CFormView::OnCtlColor( pDC, pWnd, nCtlColor);
  78.                 pDC->SetBkMode(TRANSPARENT);
  79.                 return (HBRUSH)GetStockObject( LTGRAY_BRUSH);        // it' s nicer!
  80.             }